package bg.tu.varna.pms.model.communication;

import java.io.Serializable;

import bg.tu.varna.pms.model.Contact;

public final class FriendshipMessage {
	public static enum Type {
		Add, Remove, Accept, Decline
	}

	public final static class Request implements Serializable {
		private static final long serialVersionUID = -8053374400786193467L;
		private final Type mReqType;
		private final String mUsername;
		private final String mMessage;

		public Request(Type reqType, String username, String message) {
			mReqType = reqType;
			mUsername = username;
			mMessage = message;
		}

		public Type getReqType() {
			return mReqType;
		}

		public String getUsername() {
			return mUsername;
		}

		public String getMessage() {
			return mMessage;
		}
	}

	public final static class Response implements Serializable {
		private static final long serialVersionUID = -9028451996259310033L;
		private final Contact mContact;
		private final Type mType;
		private final String mMessage;

		public Response(Contact contact, Type type, String message) {
			mContact = contact;
			mType = type;
			mMessage = message;
		}

		public Contact getContact() {
			return mContact;
		}

		public String getUsername() {
			return mContact.getUsername();
		}

		public Type getType() {
			return mType;
		}

		public String getMessage() {
			return mMessage;
		}
	}
}
